package com.share.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserStatus {
    NORMAL(true,"正常"),
    FROZEN(false,"冻结"),
    ;
    @EnumValue //将枚举类型与数据库转换
    private final Boolean value;
    @JsonValue //SpringMVC 使用 jackson序列化返回时将自动序列化值
    private final String desc;
}
